package org.yaglyf.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.stereotype.Component;
import org.yaglyf.api.entity.UserInfo;
import org.yaglyf.cache.CacheEvict;
import org.yaglyf.cache.Cacheable;

@Component
@Mapper
@CacheConfig(cacheNames = "users")
public interface UserInfoMapper {
    @CacheEvict
    int deleteByPrimaryKey(Integer id);
    @CacheEvict
    int insert(UserInfo record);
    @CacheEvict
    int insertSelective(UserInfo record);
    @Cacheable
    UserInfo selectByPrimaryKey(Integer id);
    @CacheEvict
    int updateByPrimaryKeySelective(UserInfo record);
    @CacheEvict
    int updateByPrimaryKey(UserInfo record);
}